/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sorting_searching;

import DlinkedList.MyDList;
import stack.MyStack;

/**
 *
 * @author Administrator
 */
public interface SDataInterface {

    /**
     * This method is used to search array for this element
     * @return Object its type is same type of data array but in some case return index of element data array
     * if the element is found else return null
     */
    Object binSearch();

    /**
     * This method is used to data from stack to data array and ser search element
     * @param stack stack which contains data
     * @param o searched element
     */
    void copyList(MyStack stack, Object o);

    /**
     * This method is used to copy elements from doubly linked list to data list
     * and set element which we search for it
     * in this case data array will be of type array of DNode(doubly linked node)
     * @param list doubly linked list which contains data
     * @param o element which we search for it
     */
    void copyList(MyDList list, Object o);

    /**
     * This method is used to get comparekey
     * @return comparekey
     */
    int getCompareKey();

    /**
     * This method is used to get data array
     * @return data array
     */
    Object[] getData();

    /**
     * This method is used to get searched element
     * @return searched element
     */
    Object getElement();

    /**
     * This method is used to set comparekey
     * @param compareKey new comparekey
     */
    void setCompareKey(int compareKey);

    /**
     * This method is used to set data array
     * @param data  new data array
     */
    void setData(Object[] data);

    /**
     * This method is used to set searched element
     * @param element new searched element
     */
    void setElement(Object element);

    /**
     * This method is used to to call quik sort method to sort data array
     */
    void sortList();

}
